import http from '@/http';

export default {
	insert: {
		name: '增加权限',
		url: '/api/permissions',
		call: async function (params: any = {}) {
			return await http.post(this.url, params);
		},
	},
	delete: {
		name: '删除权限',
		url: '/api/permissions',
		call: async function (params: any = {}) {
			return await http.delete(this.url, params);
		},
	},
	update: {
		name: '修改权限',
		url: '/api/permissions',
		call: async function (params: any = {}) {
			return await http.put(this.url, params);
		},
	},
	select: {
		name: '查询权限',
		url: '/api/permissions',
		call: async function (params: any = {}) {
			return await http.get(this.url, params);
		},
	},
	getbyrid: {
		name: '根据角色ID查询权限',
		url: '/api/permissions/byrid',
		call: async function (params: any = {}) {
			return await http.get(this.url, params);
		},
	},
	getbyuid: {
		name: '根据用户ID查询权限',
		url: '/api/permissions/byuid',
		call: async function (params: any = {}) {
			return await http.get(this.url, params);
		},
	},
};